#!/user/bin/env python3
# -*- coding: utf-8 -*-
"""
--------------------------------------
    Author:     JiChao_Song
    Data  :     2020/5/9 下午2:08
--------------------------------------
"""

import unittest

from config.setting import ACCESS_TOKEN
from utils.requestsmain import Requests


class Role(unittest.TestCase):
    """
    角色模块
    """

    def setUp(self) -> None:
        pass

    def tearDown(self) -> None:
        pass

    def test_role_list(self):
        """
        角色列表
        :return:
        """
        url = '/organize/role/list'

        headers = {
            'accesstoken': ACCESS_TOKEN,
        }

        data = {
            'page': 1,
            'size': ""
        }

        response = Requests(url).Post(data=data, headers=headers)

        code = response.json()['code']

        self.assertEqual(code, 20000, msg=response.json())